package org.car.world.common.util;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 解析图片、选项工具类
 *
 * @author szw
 */
public class MyPlUtil {


    private static List<Object> XxList = new ArrayList<Object>();
    private static List<Object> ImList = new ArrayList<Object>();
    private static String[] ArrayData;

    /**
     * 获得选项方法
     *
     * @author szw
     */
    public static List<Object> GetPiXx(String datastr) {
        try {
            ArrayData = datastr.split(",");
            if (ArrayData.length <= 0) {
                XxList.add(datastr);
            } else if (ArrayData.length > 0) {
                for (int i = 0; i < ArrayData.length; i++) {
                    if (ArrayData[i] != "") {
                        XxList.add(ArrayData[i]);
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

        return XxList;
    }


    /**
     * 获得评论图片
     *
     * @author szw
     */
    public static List<Object> GetPiIm(String datastr) {
        try {
            ArrayData = datastr.split(",");
            if (ArrayData.length <= 0) {
                ImList.add(datastr);
            } else if (ArrayData.length > 0) {
                for (int i = 0; i < ArrayData.length; i++) {
                    if (ArrayData[i] != "") {
                        ImList.add(ArrayData[i]);
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

        return ImList;
    }


}
